The present invention relates to error correction techniques, and more particularly, to methods and apparatuses for generating error correction codes corresponding to data with a block configuration.
In data storage systems or data transmission systems, error correction mechanisms are important for improving the correctness of data. For example, source data to be recorded into an optical disc need to be encoded to generate corresponding error correction codes. Those error correction codes are then recorded into the optical disc together with the source data so that the data reproducing system is able to check and correct errors within the data retrieved from the optical disc according to the error correction codes.
FIG. 1 shows a typical ECC block 100 of a standard digital versatile disc (DVD) or a high definition DVD (HD-DVD). As illustrated, elements in the ECC block 100 are arranged into 208 rows with 182 columns, wherein each element is one byte. Each row of the ECC block 100 has ten elements of parity inner codes (PI codes) of Reed-Solomon product code (RSPC). For example, elements B0,172 through B0,181 are the PI codes of the first row of the ECC block 100. In addition, each column j (for j=0˜171) of the ECC block 100 has sixteen elements of parity outer codes (PO codes) of RSPC. For example, elements B192,0 through B207,0 are the PO codes of the first column of the ECC block 100. The ECC block 100 can be divided into three parts: a data block 110, a PO block 120, and a PI block 130. The data block 110 is composed of scrambled source data. The PO block 120 is composed of the PO codes corresponding to the scrambled source data. The PI block 130 is composed of the PI codes corresponding to the scrambled source data. The generation of the PO codes within the PO block 120 can be described by the following remainder polynomial Rj(X):
                                          R            j                    ⁡                      (            x            )                          =                                            ∑                              i                =                192                            207                        ⁢                                          B                                  i                  ,                  j                                            ⁢                              x                                  207                  -                  i                                                              =                                    (                                                ∑                                      i                    =                    0                                    191                                ⁢                                                      B                                          i                      ,                      j                                                        ⁢                                      x                                          191                      -                      i                                                                                  )                        ⁢                          x              16                        ⁢            mod            ⁢                                                  ⁢                                          G                po                            ⁡                              (                x                )                                                                        (        1        )                            where Gpo(x) is the PO generation polynomial.        
Before being recorded into a DVD or a HD-DVD, the scrambled source data is encoded for generating the corresponding PO codes and PI codes. The operation for generating the PO codes is referred to as PO encoding while the operation for generating the PI codes is referred to as PI encoding. In the related art, the scrambled source data to be recorded into the DVD or HD-DVD are typically stored in a DRAM (Dynamic Random Access Memory) during the encoding processes. In the conventional PO encoding process, the scrambled source data are sequentially read out from the DRAM column by column for generating the corresponding PO codes. In order to read data elements of a same column from the DRAM, the page-crossing access of the DRAM frequently occurs. Unfortunately, the frequent page-crossing access results in the poor DRAM access efficiency due to the access latency of page miss.